package com.szd.qiongyou20.home.search.presenter;

import com.szd.qiongyou20.home.search.bean.UserBean;
import com.szd.qiongyou20.home.search.modle.LoadSearchData;
import com.szd.qiongyou20.home.search.modle.SearchData;
import com.szd.qiongyou20.home.search.modle.SearchUserListener;
import com.szd.qiongyou20.home.search.view.UserDataToView;

/**
 * Created by SZD on 2016/12/26.
 */

public class UserPre {

    private SearchData mSearchData;
    private UserDataToView mUserDataToView;
//    private String keyword;

    public UserPre(UserDataToView userDataToView, String keyword) {
        mUserDataToView = userDataToView;
        mSearchData = new LoadSearchData(keyword);
    }

    public void loadDataToView(){
        mSearchData.searchUserData(new SearchUserListener() {
            @Override
            public void searchSuccess(UserBean userBean) {
                mUserDataToView.DataToView(userBean);
            }

            @Override
            public void searchFaile(String string) {

            }
        });
    }
}
